﻿namespace StringsAndTextProcessing
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    class LettersRepetitions
    {
        // 1.2.13.21. Write a program that reads a string from the console and prints all different letters in
        // the string along with information how many times each letter is found.

        static void Main()
        {
            var text = Console.ReadLine();
            var letters = new Dictionary<char, int>();

            for (char i = 'a'; i <= 'z'; i++)
            {
                letters.Add(i, 0);
            }

            for (char i = 'A'; i <= 'Z'; i++)
            {
                letters.Add(i, 0);
            }

            foreach (char curr in text)
            {
                if (letters.ContainsKey(curr))
                {
                    letters[curr]++;
                }
            }

            var ordered = letters.OrderBy(x => x.Key);

            foreach (var item in ordered)
            {
                if (item.Value != 0)
                {
                    Console.WriteLine("{0} -> {1} ", item.Key, item.Value);
                }
            }
        }
    }
}